/**
 * 上传文件
 * @author xiaoqiang <465633678@qq.com>
 * @created 2018/11/02 09:41:18
 */
const path = require('path')
const Koa = require('koa')
const views = require('koa-views')
const router = require('./router')
const app = new Koa()
// views模板中间件
app.use(views(
  // 设置模板目录
  path.join(__dirname, './views'),
  {
    // 模板后缀名省略
    extension: 'html'
  }
))
app.use(router.routes(), router.allowedMethods())
app.use(async (ctx) => {
  
}).listen(9999)